<template>
    <a-row v-show="isShow">
      <a-col :sm="3" :xs="24">
        <head-info title="理论课时" :content="teacherClasstime.lecture+''" :bordered="true"/>
      </a-col>
      <a-col :sm="3" :xs="24">
        <head-info title="实践课时" :content="teacherClasstime.practical+''" :bordered="true"/>
      </a-col>
      <a-col :sm="3" :xs="24">
        <head-info title="课程设计" :content="teacherClasstime.courseDesign+''" :bordered="true"/>
      </a-col>
      <a-col :sm="3" :xs="24">
        <head-info title="毕设指导" :content="teacherClasstime.graduateTutorial+''" :bordered="true"/>
      </a-col>
      <a-col :sm="3" :xs="24">
        <head-info title="毕设答辩" :content="teacherClasstime.graduateDefense+''" :bordered="true"/>
      </a-col>
      <a-col :sm="3" :xs="24">
        <head-info title="顶岗实习" :content="teacherClasstime.internship+''" :bordered="true"/>
      </a-col>
      <a-col :sm="3" :xs="24">
        <head-info title="实践讲课" :content="teacherClasstime.practicalTutorial+''" :bordered="true"/>
      </a-col>
      <a-col :sm="3" :xs="24">
        <head-info title="总课时" :content="teacherClasstime.totalClasstime+''" />
      </a-col>
    </a-row>
</template>

<script>
import HeadInfo from '@/components/tools/HeadInfo'
import teacherResultRanking from '@views/gfxy/result/modules/teacherResultRanking'
import { getAction } from '@api/manage'

export default {
  name: "ClasstimeResultListItemV1",
  components: {HeadInfo,teacherResultRanking},
  props: {
    teacherClasstime: {
      type: String,
      required: true
    },
  },
  data(){
    return {
      url:{
        getClasstimeScoreCurrentDateByUsername:'index/teacherIndex/getClasstimeScoreByDateAndUsername'
      }
    }
  },
  computed:{
    getButtomShow(){
      if(this.isShow){
        return "隐藏详情"
      } else {
        return "显示详情"
      }
    },
    getIconShow(){
      if(this.isShow){
        return "up-circle"
      } else {
        return "down-circle"
      }
    },
    schoolRanking(){
      if(this.score.score == 0){
        return this.teacherCount.schoolTeacherCount
      } else {
        return this.score.shcoolRanked
      }
    },
    depRanking(){
      if(this.score.score == 0){
        return this.teacherCount.orgTeacherCount
      } else {
        return this.score.orgRanked
      }
    }
  },
  methods:{
    showButtomShow(){
      this.isShow = !this.isShow
    },
    getTeacherClasstime(){
      console.log(this.date , this.userName)

      let param = { username: this.userName , date: this.date}
      getAction(this.url.getClasstimeScoreCurrentDateByUsername, param).then((res) => {
        console.log(res)
        if (res.success) {
          if(res.result != null){
            this.teacherClasstime = res.result;
            console.log(this.teacherClasstime)
          }
        }
      });
    }
  },
  mounted() {
    this.getTeacherClasstime();
  }

}
</script>teacherClasstime

<style scoped>
.ant-badge-count{
  font-size: 24px
}
</style>